<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
    <!-- Meta Tags -->
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="ThemeDox">
    <title>Add Announcements</title>
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
    <div class="container mt-5 mb-5" style="padding-top: 80px;">
        <h2 class="text-center">Manage Announcements</h2>
        <div class="row">
            <div class="col-md-6">
                <h4>Announcements List</h4>
                <table class="table table-bordered mt-3" id="announcementsTable">
                    <thead class="thead-dark">
                        <tr>
                            <th>Title</th>
                            <th>Date</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody></tbody>
                </table>
            </div>
            <div class="col-md-6">
                <h4>Add / Edit Announcement</h4>
                <form id="announcementForm" class="mt-3">
                    <div class="form-group mb-3">
                        <label>Title</label>
                        <input type="text" id="title" class="form-control" required>
                    </div>
                    <div class="form-group mb-3">
                        <label>Date</label>
                        <input type="date" id="date" class="form-control" required>
                    </div>
                    <div class="form-group mb-3">
                        <label>Image URL</label>
                        <input type="text" id="image" class="form-control">
                    </div>
                    <div class="form-group mb-3">
                        <label>Content</label>
                        <textarea id="content" class="form-control" rows="3" required></textarea>
                    </div>
                    <button type="submit" class="btn btn-danger btn-sm">Save Announcement</button>
                </form>
            </div>
        </div>
    </div>

    <script>
        document.addEventListener("DOMContentLoaded", function() {
            let today = new Date().toISOString().split('T')[0];
            document.getElementById("date").value = today;
        });
    </script>

    <script src="assets/js/jquery-3.7.1.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/main.js"></script>
</body>
</html>